window.addEventListener('load', function(){
    var user_major = document.getElementById('user-major')
    var user_info = document.getElementById('user-info')
    var index = document.getElementById('index')
    var index_banner = document.getElementById('index-banner')
    var logout = document.getElementById('logout')
    var setting = document.getElementById('setting')
    var user_return = document.getElementById('user-return')
    var major_btn =document.getElementById('major-btn')

    // 创作者中心
    var center = document.getElementById('center')
    var center_more = document.getElementById('center-more')
    center.onmouseover = function(){
    center_more.style.display='block';
    }

    center_more.onmouseleave=function(){
        center_more.style.display='none';
       }


// 登陆
var login = document.getElementById('login')
var login_btn = document.getElementById('login-btn')
var login_close= document.getElementById('login-close')
var login_avt= document.getElementById('login-avt')
var avt_more= document.getElementById('avt-m')

login_btn.onclick=function(){
    login.style.display='block';
   }
   login_close.onclick=function(){
    login.style.display='none';
   }

//    点击头像显示

login_avt.onclick=function(){
    avt_more.style.display ='block';
}
avt_more.onmouseleave=function(){
    avt_more.style.display='none';
   }
   
//    个人资料显示
setting.onclick=function(){
    index_banner.style.display='none';
    user_info.style.display ='block';

}

major_btn.onclick=function(){
    index_banner.style.display='none';
    user_info.style.display ='block';

}

// 个人主页显示
user_return.onclick=function(){
    index_banner.style.display='none';
    user_info.style.display ='none';
    user_major.style.display='block';
}

   


// 首页显示
index.onclick=function(){
    index_banner.style.display='block';
    user_major.style.display='none';
    user_info.style.display='none';
   }




})